package com.cswangdao.mapper;

import com.cswangdao.domain.model.MarketOrderGoods;
import com.cswangdao.domain.po.OrderGoods;
import com.cswangdao.domain.vo.WXOrderGoodsVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MarketOrderGoodsMapper {
    /**
     * @description: 根据订单id获取商品列表
     * @param: orderId
     * @return: List<OrderGoods>
     */
   public List<OrderGoods> getOrderGoodsByOrderId(Integer orderId);

   /**
    * @description: 根据订单Id删除商品列表
    * @param: orderId
    * @return: void
    */
    @Delete("delete from market_order_goods where order_id = #{orderId} ")
    void deleteByOrderId(@Param("orderId") int orderId);

    void insertBatch(List<MarketOrderGoods> orderGoodsList);

    List<WXOrderGoodsVo> queryByOrderId(@Param("orderId") Integer orderId);
}